#region Using Statements

using System.Collections.Generic;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using ZombieHigh2.GameState;
using System;

#endregion

namespace ZombieHigh2.Screens
{
    public class CreditScreen : IGameState
    {
        SpriteFont arial;
        Vector2 textPos;
        String[] credits = {"Simon - Programmer","Chris Butts - Artist","John Allbright - Level Artist", "Conrad Turgeon - Storyboard", "Shauna Pringle - Sexy Hot G/F"};
        SpriteBatch spriteBatch;

        ContentManager content;

        public ContentManager Content { get { return content; } }
        public bool IsPaused { get { return false; } }

        public CreditScreen(ContentManager content)
        {
            this.content = content;
            textPos = new Vector2(100, 100);
        }

        public void LoadGraphics(GraphicsDevice device)
        {
            arial = content.Load<SpriteFont>(@"Data\Fonts\Credits");
            spriteBatch = new SpriteBatch(device);
        }

        public void Load()
        {
        }

        public void UnloadGraphics()
        {
        }

        public void Update(GameTime gameTime)
        {
            textPos.Y -= 1f;
        }

        public void Draw(GraphicsDevice device)
        {
            Vector2 newPos = textPos;
            spriteBatch.Begin(SpriteBlendMode.AlphaBlend, SpriteSortMode.Immediate, SaveStateMode.SaveState);
            for (int i = 0; i < credits.Length; i++)
            {
                newPos.Y = textPos.Y + 200 * i;
                spriteBatch.DrawString(arial, credits[i], newPos, Color.White);
            }
            spriteBatch.End();
        }
    }
}
